import Vue from 'vue';
import Router from 'vue-router';
import Home from '@/views/home/Home'
import Blog from '@/views/blog/Blog'
import New from '@/views/new/New'
import NewList from '@/views/new/NewList'
import Login from '@/views/login/Login'
import Help from '@/views/help/Help'

Vue.use(Router)

export default new Router({
	// mode: 'history', //去除访问地址中的#号，启用打包部署时路由会白屏
	// linkActiveClass: "active",
	// base: "/dandan/vue/", //应用的基路径。例如，如果整个单页应用服务在 /app/ 下，然后 base 就应该设为 "/app/"
	routes: [
		{
			path: '/',
			name: 'index',
			meta: {
				index: '1'
			},
			component: Home
		},
		{
			path: '/home',
			name: 'home',
			meta: {
				index: '1'
			},
			component: Home
		},
		{
			path: '/blog',
			name: 'blog',
			meta: {
				index: '2'
			},
			component: Blog
		},
		{
			path: '/newList',
			name: 'newList',
			component: NewList,
			meta: {
				index: '3'
			}
		},
		{
			path: '/new',
			name: 'new',
			component: New,
			meta: {
				index: '3'
			}
		},
		{
			path: '/help',
			name: 'help',
			component: Help,
			meta: {
				index: '4'
			}
		},
		{
			path: '/login',
			name: 'Login',
			component: Login,
			meta: {
				index: '11'
			}
		}
	]
})
